package interfaz;

import java.awt.GridLayout;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;


public class EdicionMaquinas {

	protected JPanel panel;
	
	//sub paneles
	protected JPanel p_agregar;
	protected JPanel p_eliminar;
	protected JPanel p_editar;
	protected JPanel p_informe;
	
	protected JButton CargarFoto;
	protected JButton Agregar;
	protected JButton Editar;
	protected JButton Eliminar;
	
	protected JFileChooser fileChooser;
	protected String direccion = "";
	
	protected JLabel l_informe;
	
	//clases que modelan el comportaminto del los 3 paneles principales
	protected EM_AgregarMaquina addM;

	
	public EdicionMaquinas(JPanel panelEdicionMaquinas){
		l_informe = new JLabel("informe");
		l_informe.setBounds(450,50,700,50);
		
		panel = panelEdicionMaquinas;
		panel.setLayout(new GridLayout(4, 1));
		
		agregarPaneles();
		addM = new EM_AgregarMaquina(l_informe,p_agregar);
	}

	private void agregarPaneles(){
		p_agregar = new JPanel();
		p_agregar.setLayout( null );
		p_agregar.setBorder( BorderFactory.createTitledBorder ("Agregar...") );
		panel.add(p_agregar);
		
		
		p_eliminar = new JPanel();
		p_eliminar.setLayout( null );
		p_eliminar.setBorder( BorderFactory.createTitledBorder ("Eliminar...") );
		panel.add(p_eliminar);
		
		p_editar = new JPanel();
		p_editar.setLayout( null );
		p_editar.setBorder( BorderFactory.createTitledBorder ("Editar...") );
		panel.add(p_editar);
		
		p_informe = new JPanel();
		p_informe.setLayout( null );
		p_informe.setBorder( BorderFactory.createTitledBorder ("Estado...") );
		panel.add(p_informe);
		p_informe.add(l_informe);
	}
	
}

	
	

